package com.tyl.portotype原型模式.demo02;

import java.util.Date;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        /**原型对象video1**/
        Date date = new Date();
        Video video1 = new Video("唐唐亚磊学Java",date);
        /**克隆video1（浅克隆）**/
        Video video2 = (Video) video1.clone();
        System.out.println("video:"+video1);
        System.out.println("video2:"+video2);
        System.out.println("============================");
        date.setTime(345535);
        System.out.println("video:"+video1);
        System.out.println("video2:"+video2);

    }
}
